package com.ssm.order.fegin.fallback;

import com.ssm.dto.CommonResult;
import com.ssm.exception.ServiceException;
import com.ssm.model.stock.StockModel;
import com.ssm.order.fegin.StockFeign;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class StockFeignFallback implements StockFeign {

    private Logger log = LoggerFactory.getLogger(StockFeignFallback.class);

    @Override
    public CommonResult<StockModel> getStockDetail() {
        log.error("调用查询库存详情降级");
        return CommonResult.error(null, -100, "调用查询库存详情降级");
    }
}
